package com.ygqh.baby.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.YgAccountDetail;
import com.ygqh.baby.po.YgAccountDetailExample;

public interface YgAccountDetailMapper {
	int countByExample(YgAccountDetailExample example);

	int deleteByExample(YgAccountDetailExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgAccountDetail record);

	int insertSelective(YgAccountDetail record);

	List<YgAccountDetail> selectByExample(YgAccountDetailExample example);

	YgAccountDetail selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgAccountDetail record, @Param("example") YgAccountDetailExample example);

	int updateByExample(@Param("record") YgAccountDetail record, @Param("example") YgAccountDetailExample example);

	int updateByPrimaryKeySelective(YgAccountDetail record);

	int updateByPrimaryKey(YgAccountDetail record);

	int countSuper(@Param("q") String q);

	List<YgAccountDetail> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	List<YgAccountDetail> searchDetailByUserId(@Param("queryInfo") QueryInfo queryInfo, @Param("username") String username, @Param("userId") Long userId,
			@Param("source") String source, @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("remark") String remark);

	Double calculateSumPrice(@Param("username") String username, @Param("userId") Long userId, @Param("source") String source,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("remark") String remark);

	int countSearchDetailByUserId(@Param("userId") Long userId, @Param("username") String username, @Param("source") String source,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("remark") String remark);

	int addBatch(@Param("accountDetail") List<YgAccountDetail> accountDetail);
}
